package de.sendorian.app.forumArchive.repository;

import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.stereotype.Component;

import de.sendorian.app.forumArchive.domain.Forum;


@Component
public class ForumRepository extends RepositoryBase<Forum> {

	public ForumRepository() {
		super(Forum.class);
	}


	public Forum findByName(String name) {
		try {
			return findByUniqueAttribute("name", name);
		} catch (EmptyResultDataAccessException e) {
			logger.debug("No Forum found with name " + name);
		}
		return null;
	}
}
